package com.java1412.mapper;

import com.java1412.dto.UserDto;
import com.java1412.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author java1412
 * @since 2023-08-07 09:23:10
 */
public interface UserMapper {

    // 前台登录
    public User findByUsername(@Param("username") String username);

    // 条件查询
    List<User> find(Map<String, Object> map);

    // 根据条件查询数量
    Integer findCount(Map<String, Object> map);

    // 注册用户
    Integer add(UserDto userDto);

    // 根据id查询用户信息
    User findById(@Param("userId") Integer userId);
}
